/*
 * @Author: ShaXin
 * @Date: 2022-01-06 15:25:10
 * @LastEditors: jgg
 * @LastEditTime: 2022-01-26 17:45:18
 */
import request from '../utils/request'

const abcApi = {}
// 监测点信息
abcApi.pageList = (params) => {
    return request({
        url: '/web/baseinfo/equipment/findMonitorByPageList',
        method: 'get',
        params:params
    })
}

abcApi.findById = (params) => {
    return request({
        url: `/web/baseinfo/equipment/findById/${params}`,
        method: 'get',
        params:{}
    })
}
abcApi.deleteInfo = (params) => {
    return request({
        url: `/web/baseinfo/equipment/delete/${params}`,
        method: 'DELETE',
        params:{}
    })
}
abcApi.save = (params) => {
    return request({
        url: '/web/baseinfo/equipment/saveEquipment',
        method: 'post',
        data:params
    })
}
abcApi.update = (params) => {
    return request({
        url: `/web/baseinfo/equipment/update/${params.stationId}`,
        method: 'PUT',
        data:params
    })
}

abcApi.monitorInfo = (params) => {
    return request({
        url: '/monitor/info',
        method: 'get',
        params:params
    })
}

abcApi.cameraDetail = (params) => {
    return request({
        url: '/monitor/cameraDetail',
        method: 'get',
        params:params
    })
}
//
abcApi.monitorInfoDetail = (params) => {
    return request({
        url: '/monitor/infoDetail',
        method: 'get',
        params:params
    })
}

//查询水库风险等级数量
abcApi.findByRisk = (params) => {
    return request({
        url: '/scareen/equitmentRun/findByRisk',
        method: 'get',
        params:params
    })
}
//查询水库设备数量
abcApi.findByEquit = (params) => {
    return request({
        url: '/scareen/equitmentRun/findByEquit',
        method: 'get',
        params:params
    })
}
//查询所有风险的水库
abcApi.findRiskErr = (params) => {
    return request({
        url: '/workplatform/hour/findRiskErr',
        method: 'get',
        params:params
    })
}
//查询所有异常的水库
abcApi.findRunErr = (params) => {
    return request({
        url: '/workplatform/hour/findRunErr',
        method: 'get',
        params:params
    })
}
//根据风险等级查询设备信息
abcApi.findRiskList = (params) => {
    return request({
        url: `/scareen/equitmentRun/findRiskList/${params}`,
        method: 'get',
        params:{}
    })
}

export default abcApi